package org.restlesscode.javersion.transcoders.bean;

/**
 * Serialize and deserialize a class to and from a String.
 * @param <T>
 */
public interface StringSerializer<T> {

    /**
     * Convert object to a String. 
     * @param t
     * @return
     */
	public String serialize(T t);

    /**
     * Convert a string into an Object.
     * @param s
     * @return
     */
	public T deserialize(String s);

    /**
     * Return the source class type.
     * @return
     */
	public Class<T> getSerializerSourceClass();
	
}
